<template>
	<view class="goodslist">
	
	</view>
</template>

<script>
	export default {
		data() {
			return {
			   keyword:"",
			   searchResList:[]
			};
		},
		onLoad({query}){
			this.keyword = query;
			this.getSearchList();
		},
		methods:{
			async getSearchList(){
				let {data:{message,meta}} = await uni.$http.get(`/api/public/v1/goods/search?query=${this.keyword}`);
				if(meta && meta.status == 200){
					this.searchResList = message;
				}else{
					uni.$showReqFailToast()
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	
</style>
